/**
 *
 */
package com.beta.restapi.internal;

/**
 * @author vector
 */
public class Consts {

    /**
     * API路径前缀，以'/'结尾
     */
    public static final String API_PATH_PREFIX = "/api/v1/";

    /**
     * header中token的键
     */
    public static final String HEADER_AUTH_KEY = "Authorization";

    /**
     * token默认失效时间
     */
    public static final Long DEFAULT_TOKEN_EXPIRE_SECONDS = 7 * 24 * 3600L;

    /**
     * token缓存的key前缀
     */
    public static final String AUTH_TOKEN_CACHE_KEY_PREFIX = "AuthTokens:";

//    /**
//     * token缓存的值前缀
//     */
//    public static final String AUTH_TOKEN_VALUE_PREFIX = "Bear ";

    /**
     * request属性键值常量
     *
     * @author vector
     */
    public static class RequestAttributeKey {
        /**
         * 当前登录用户对象
         */
        public static final String USER_OBJ = "__user_obj";
        /**
         * 当前登录用户ID
         */
        public static final String USER_ID = "__user_id";
    }

    /**
     * @author vector 资源常量类
     */
    public static class Resource {

        public static final String AUTH = "auth";

        public static final String USER = "user";
        public static final String USERS = "users";

        public static final String CONFIRMATION_CODE = "confirmation_codes";

        public static final String CATEGORY = "category";
        public static final String CATEGORIES = "categories";

        public static final String PRODUCTITEM = "product_item";
        public static final String PRODUCTITEMS = "product_items";

		public static final  String RECEIVER="receiver";
		public static final String RECEIVERS="receivers";
        
        public static final String VERSION = "version";

        public static final String CITY = "city";
        public static final String CITIES = "cities";
        
        public static final String PROPERTIES = "properties";

		public static final String CARTITERMS = "cart_items";

        public static final String ORDER = "order";
        public static final String ORDERS = "orders";

        public static final String PAYMENT = "payment";
        public static final String PAYMENTS = "payments";

        public static final String YEEPAY_PAY_NOTIFY = "yeepay/pay/notify";
//        public static final String YEEPAY_PAY_NOTIFY_REDIRECT = "yeepay/pay/notify/redirect";
        public static final String YEEPAY_DIVIDE_NOTIFY = "yeepay/divide/notify";

        public static final String SHIPMENTS ="shipments";

        public static final String SALES_ORDERS = "sales_orders";

        public static final String REFUND_ITEMS = "refund_items";

        public static final String DOWNLOAD_PICTURE ="";

        public static final String IMAGES = "images";

        public static final String UPLOAD = "upload";
        public static final String HOME_BANNERS="home_banners";
    }

    public static class ResponseCode {

        public static final String BAD_REQUEST = "E000400";

//        public static final String FAILED = "E000422";

        public static final String INTERNAL_SERVER_ERROR = "E000500";

        public static final String SQL_EXC_ERROR = "E000420";

    }
    public static class PictureResources{
        public static final String UPLOADS ="/uploads";
        public static final String HOME_BANNER ="/home_banner";
        public static final String HOME_RECOMMEND="/home_recommend";
        public static final String PIC_URL="/pic_url";
        public static final String CATEGORY="/category";
        public static final String POSTER="/poster";
        public static final String PRODUCT="/product";

    }
}









